package com.blockchain.front.servlets.security;

import javax.servlet.annotation.MultipartConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;

import com.blockchain.framework.http.upload.PartFile;
import com.blockchain.framework.service.ServiceSession;
import com.blockchain.front.service.security.SecurityManage;
@MultipartConfig
public class Smrz extends AbstractSceurityServlet {

	private static final long serialVersionUID = 1L;

	@Override
	protected void processPost(HttpServletRequest request, HttpServletResponse response, ServiceSession serviceSession)
			throws Throwable {
		Part z = request.getPart("z");
		Part f = request.getPart("f");
		PartFile z_images=new PartFile(z);
		PartFile f_images=new PartFile(f);
		SecurityManage manage = serviceSession.getService(SecurityManage.class);
		manage.add(z_images, f_images);
		sendRedirect(request, response, getController().getURI(request, Smrz.class));
	}

}